package com.heisenhub.api.systemapi;

import com.heisenhub.api.systemapi.fallback.UserServiceFallback;
import com.heisnenhub.common.module.entity.SystemUser;
import com.heisnenhub.common.module.utils.Api;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author sen
 * @description
 * @date 2023/12/18 17:22
 */
@FeignClient(value = "system", contextId = "userClient", fallbackFactory = UserServiceFallback.class)
public interface UserService {

    /**
     *  获取登入的用户
     * @param username
     * @return
     */
    @GetMapping("/user/findUserByUsername")
    Api<SystemUser> LoginByName(@RequestParam("username") String username);


    @GetMapping("/user/findUserByMobile")
    Api<SystemUser> LoginByMobile(@RequestParam("mobile") String mobile);

}
